Emit less garbage without opts, if it has no side effects#1141
Emit less garbage without opts, if it has no side effects#1141
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 044797f8e8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
...eeeq.wurstscript/src/main/java/de/peeeq/wurstscript/translation/imoptimizer/ImOptimizer.java
Outdated
Show resolved
Hide resolved
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f419f6b8e6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
...eeeq.wurstscript/src/main/java/de/peeeq/wurstscript/translation/imoptimizer/ImOptimizer.java
Show resolved
Hide resolved
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 009ce6c63d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (mayTrapAtRuntime(expr)) { | ||
| return Collections.singletonList(expr); | ||
| } |
There was a problem hiding this comment.
Analyze callee bodies before deleting dead-store RHS
collectSideEffects now deletes unread assignments unless mayTrapAtRuntime(expr) or hasObservableSideEffects(expr, ...) is true, but the trap check is only intra-expression and does not look into called function bodies. This means a pure wrapper call like wrap(y) (where wrap contains 1 div y) can now be removed entirely, silently dropping a potential divide-by-zero trap and changing runtime behavior; previously the RHS was always preserved. Please make trap detection interprocedural (or conservatively keep calls whose bodies may trap) before replacing with an empty statement.
Useful? React with 👍 / 👎.
No description provided.